﻿using MediatR;
using RBAC.LuFang.API.Application.Command.imgCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.imgCommandHandler
{
    //显示产品检验报告图片
    public class imgSelectChanPinCommandHandler:IRequestHandler<imgSelectChanPinCommand,List<imges>>
    {
        private readonly IGoodsService _goodsService;

        public imgSelectChanPinCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<List<imges>> Handle(imgSelectChanPinCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.GetChanPinImg(request.imgtype,request.goodsid);
        }
    }
}
